<div class="nav-tabs-custom">
    <ul class="nav nav-tabs pull-right">
        <li>
            <a data-toggle="tab" href="#tab_3-3">Companies</a>
        </li>
        <li>
            <a data-toggle="tab" href="#tab_2-2">Locations</a>
        </li>
        <li class="active">
            <a data-toggle="tab" href=" #tab_1-1">Categories</a>
        </li>
        <li class="pull-left header">
                <!-- <i class="fa fa-th"></i>-->
            <span style="color:#3C8DBC !important;">Browsing Jobs By</span>
        </li>
    </ul>
    <div class="tab-content">
        <div id="tab_1-1" class="tab-pane active">
            <div class="row">
                <?php
                $i = 0;
                foreach ($browse_categories->result() as $category) {
                    $category_id = $category->job_category_id;
                    $name = $category->name;
                    $keys = $category->job_categories_keys;
                    $count_jobs = $category->count_jobs;
                    if ($i != 24) {
                        if ($i % 3 == 0) {
                            ?>
                            <div class="col-xs-4 clear pull-right">
                                <a href="<?php echo base_url(); ?>jobs/categories/<?php echo $keys; ?>" class="gray"> <?php echo $name; ?> (<span class="red"><?php echo $count_jobs; ?></span>) </a>
                            </div>
                            <?php
                        } else {
                            ?>
                            <div class="col-xs-4 clear">
                                <a href="<?php echo base_url(); ?>jobs/categories/<?php echo $keys; ?>" class="gray"> <?php echo $name; ?> (<span class="red"><?php echo $count_jobs; ?></span>) </a>
                            </div>
                            <?php
                        }
                    }
                    $i++;
                }
                ?>

            </div>
        </div>
        <div id="tab_2-2" class="tab-pane">
            <div class="row">
                <?php
                foreach ($browse_locations->result() as $location) {
                    $countlocations = $location->countlocations;
                    $name = $location->name;
                    ?>
                    <div class="col-xs-4 clear">
                        <a href="<?php echo base_url(); ?>jobs/locations/<?php echo str_replace(" ", "-", $name); ?>"> <?php echo $name; ?> (<span class="red"><?php echo $countlocations; ?></span>) </a>
                    </div>
                    <?php
                }
                ?>

            </div>
        </div>
        <div id="tab_3-3" class="tab-pane">
            <div class="row">
                <?php
                if($browse_companies->result()=="" || $browse_companies->result()==NULL){
				?>
				<div class="col-xs-4 clear">
	                 No Compay Found.
	            </div>
				<?php
                }else{
	                foreach ($browse_companies->result() as $company) {
	                    $countcompany = $company->countcompany;
	                    $name = $company->name;
	                    $key = $company->company_key;
	            ?>
	                <div class="col-xs-4 clear">
	                    <a href="<?php echo base_url(); ?>jobs/companies/<?php echo $key; ?>" class="gray"> <?php echo $name; ?> (<span class="red"><?php echo $countcompany ?></span>) </a>
	                </div>
	           <?php
	                }
				}
                ?>

            </div>
        </div>
    </div>
</div>